{{ header }}
<div id="account-gdpr" class="container">
  <ul class="breadcrumb">
    {% for breadcrumb in breadcrumbs %}
      <li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
    {% endfor %}
  </ul>
  {% if success %}
    <div class="alert alert-success alert-dismissible"><i class="fas fa-check-circle"></i> {{ success }}</div>
  {% endif %}
  <div class="row">{{ column_left }}
    {% if column_left and column_right %}
      {% set class = 'col-sm-6' %}
    {% elseif column_left or column_right %}
      {% set class = 'col-sm-9' %}
    {% else %}
      {% set class = 'col-sm-12' %}
    {% endif %}
    <div id="content" class="{{ class }}">
      {{ content_top }}
      <div class="float-right"><button type="button" data-toggle="tooltip" title="{{ button_print }}" class="btn btn-light"><i class="fas fa-print"></i></button> <a href="{{ delete }}" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger"><i class="far fa-trash-alt"></i></a></div>
      <h1>{{ heading_title }}</h1>


      <table class="table table-bordered">
        <thead>
          <tr class="table-light">
            <th colspan="2">{{ text_customer }}</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td class="w-25">{{ text_firstname }}</td>
            <td>{{ firstname }}</td>
          </tr>
          <tr>
            <td>{{ text_lastname }}</td>
            <td>{{ lastname }}</td>
          </tr>
          <tr>
            <td>{{ text_email }}</td>
            <td>{{ email }}</td>
          </tr>
          <tr>
            <td>{{ text_telephone }}</td>
            <td>{{ telephone }}</td>
          </tr>
        </tbody>
      </table>

      {% if addresses %}
        {% set address_row = 1 %}
        {% for address in addresses %}

          <table class="table table-bordered">
            <thead>
              <tr class="table-light">
                <th colspan="2">{{ text_addresses }}</th>
              </tr>
              <tr>
                <th colspan="2">{{ text_address }} {{ address_row }}</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td class="w-25">{{ text_firstname }}</td>
                <td>{{ address.firstname }}</td>
              </tr>
              <tr>
                <td>{{ text_lastname }}</td>
                <td>{{ address.lastname }}</td>
              </tr>
              {% if address.company %}
                <tr>
                  <td>{{ text_company }}</td>
                  <td>{{ address.company }}</td>
                </tr>
              {% endif %}
              <tr>
                <td>{{ text_address_1 }}</td>
                <td>{{ address.address_1 }}</td>
              </tr>
              {% if address.address_2 %}
                <tr>
                  <td>{{ text_address_2 }}</td>
                  <td>{{ address.address_2 }}</td>
                </tr>
              {% endif %}
              <tr>
                <td>{{ text_city }}</td>
                <td>{{ address.city }}</td>
              </tr>
              {% if address.postcode %}
                <tr>
                  <td>{{ text_postcode }}</td>
                  <td>{{ address.postcode }}</td>
                </tr>
              {% endif %}
              <tr>
                <td>{{ text_country }}</td>
                <td>{{ address.country }}</td>
              </tr>
              {% if address.zone %}
                <tr>
                  <td>{{ text_zone }}</td>
                  <td>{{ address.zone }}</td>
                </tr>
              {% endif %}
            </tbody>
          </table>
          {% set address_row = address_row + 1 %}
        {% endfor %}
      {% endif %}
      {% if ips %}
        <table class="table table-bordered">
          <thead>
            <tr class="table-light">
              <th colspan="3">{{ text_history }}</th>
            </tr>
          </thead>
          <thead>
            <tr>
              <th class="w-25">{{ text_ip }}</th>
              <th class="w-25">{{ text_country }}</th>
              <th class="w-25">{{ text_date_added }}</th>
            </tr>
          </thead>
          <tbody>
            {% for ip in ips %}
              <tr>
                <td>{{ ip.ip }}</td>
                <td>{{ ip.country }}</td>
                <td>{{ ip.date_added }}</td>
              </tr>
            {% endfor %}
          </tbody>
        </table>
      {% endif %}
      <div class="d-inline-block pt-2 pd-2 w-100">
        <div class="float-right"><a href="{{ cancel }}" class="btn btn-light">{{ button_continue }}</a></div>
      </div>
      {{ content_bottom }}
    </div>
    {{ column_right }}
  </div>
</div>
{{ footer }}
